#@Author: bjy @Date: 2019/4/26 14:41 @Version 1.0#
<template>
  <el-table :data="tableDataList" highlight-current-row @current-change="handleTableChange" ref="singleTable"
            border style="width: 98%;margin:0 1%" height="600"
            v-loading="loadingBoolean"
            element-loading-text="拼命加载中"
            element-loading-spinner="el-icon-loading"
  >
    <el-table-column prop="real_name" sortable label="活动发起支部" width="180"></el-table-column>
    <el-table-column prop="activitytitle" sortable label="活动名称" width="180"></el-table-column>
    <el-table-column prop="activitysitename" label="活动地点"></el-table-column>
    <el-table-column prop="activitystarttime" sortable label="活动开始时间"></el-table-column>
    <el-table-column prop="activityendtime" sortable label="活动结束时间"></el-table-column>
    <el-table-column prop="activitycreatetime" sortable label="创建时间"></el-table-column>
    <el-table-column prop="categoryname" label="活动类型"
                     :filters="[{ text: '主题党员日', value: '主题党员日' }, { text: '志愿者活动', value: '志愿者活动' }]"
                     :filter-method="filterCategoryName" filter-placement="bottom-end">
    </el-table-column>
    <el-table-column
      prop="activitystatus"
      label="活动状态"
      :filters="[{ text: '展示中', value: '展示中' }, { text: '已下架', value: '已下架' }]"
      :filter-method="filterTag"
      filter-placement="bottom-end">
      <template slot-scope="scope">
        <el-tag
          :type="scope.row.activitystatus === '展示中' ? 'primary' : 'success'"
          disable-transitions>{{scope.row.activitystatus}}</el-tag>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
  //  此处导入组件,格式,例如:import xxx名称 from "路径"
  export default{
    // 这里是name,记得填写
    name: 'activityWonderfulList',
    props:['tableDataList','loadingBoolean'],
    //  数据定义
    data () {
      return {}
    },
    // 页面方法
    methods: {
      filterCategoryName(value, row){
        return row.categoryname === value;
      },
      filterTag(value, row) {
        return row.activitystatus === value;
      },
      handleTableChange(e){
        this.$emit('changeData',e)
      },
    },
    // 计算属性
    computed: {},
    // 侦听器
    watch: {},
    // 依赖注入
    components: {}
  }
</script>

<!-- 本地样式 -->
<style scoped>

</style>
